package day05;

    public class Players {
        public static int sum;

        public Players() {
            System.out.println("创建了一个对象");
        }

        public static void main(String[] args) {
            while (true) {
                if (sum == 11) {
                    System.out.println("对不起，已经创建了11个对象。不能再创建对象了");
                    break;
                }
                Players p = new Players();
                sum++;
            }
        }
    }
